home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group96b.txt
/
000017_icon-group-sender _Sat Oct 12 12:10:04 1996.msg
< prev
next >
Wrap
Internet Message Format
|
1997-01-02
|
2KB
Received: by cheltenham.cs.arizona.edu; Mon, 14 Oct 1996 09:47:22 MST
Message-Id: <v01510102ae858aa4ae6c@[204.73.77.122]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Date: Sat, 12 Oct 1996 12:10:04 -0600
To: icon-group@cs.arizona.edu
From: carl@bitstream.net (Carl Sturtivant)
Subject: Re: Parsing the Icon command line
Errors-To: icon-group-errors@cs.arizona.edu
>
>Agreed, now that you point it out. I therefore repeated the test
>as you suggested and got the same results as shown below. This test
>was done on a different computer that is strictly DOS, no OS/2.
>
>h:\>command
>
>Microsoft(R) MS-DOS(R) Version 6.20
> (C)Copyright Microsoft Corp 1981-1993.
>
>H:\>v:\cmdline.exe "A B" \"C D\"
>A
>B
>C D
>
>This should not be surprising since 4DOS is supposed to be compatible
>with and a superset of MS-DOS. For reference purposes, the only
>operative statement of the ICON program, cmdline, is as follows:
> every write(&output,C[1 to *C])
>where C is the list of command line arguments. The concern among
>others is the reduction of the three blanks between C and D to one.
>
> Larry Bezeau@UNB.Ca
I ran the following program on a DOS 6.20 machine, using a DOS/386
implementation of icon 9.1, with very different results.
-------------------------------
C:\>type arg.icn
#program arg.icn
procedure main(arg)
every write(!arg)
end
C:\>arg "A B" \"C D\"
A B
\"C
D\"
C:\>
-------------------------------
This behaviour was repeated under the ndos shell, and when the main program
line was replaced by "every write(arg[1 to *arg])". It would be nice if the
backslashes had disappeared, but aside from this it seems OK.
So may I suggest that the command line behaviour that you are getting is a
property not of icon, but of the compiler that built the particular
implementation that you are using. The command line parameters received by
the icon runtime system are doubtless passed in to the main C procedure in
whatever form the startup code for the compiler sees fit.
Carl Sturtivant
carl@bitstream.net